<?php defined('SYSPATH') or die('No direct access allowed.');

class Model_Api_V2_Hotel extends ORM
{
    const TYPE_ID = 2;

    /**
     * 一对一关系
     * @var string[][]
     */
    protected $_has_one = array(
        'extend' => array(
            'model' => 'Hotel_Extend_Field',
            'foreign_key' => 'productid'
        )
    );

    /**
     * 一对多关系,房型
     * @var string[][]
     */
    protected $_has_many = array(
        'room' => array(
            'model' => 'Hotel_Room',
            'foreign_key' => 'hotelid'
        )
    );

}